var mongoose = require('../common/db');

var movie = new mongoose.Schema({
  movieName: String,
  movieImg: String,
  movieVideo: String,
  movieDownload: String,
  movieTime: String,
  movieNumSuppose: String,
  movieNumDownload: String,
  movieMainPage: Boolean,
});

movie.static.findById = function(id, callback) {
  this.find({ _id: id }, callback);
};
movie.static.findAll = function(callback) {
  this.find({}, callback);
};

var movieModel = mongoose.model('movie', movie);
module.exports = movieModel;
